<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=UTF-8" %>

<div class="ulist tags">
    <h3 class="utitle fyh">
        <div class="utitle-text">
            <i class="icon-health"></i>
            <span class="cur">${userInfo.nickName }的健康信息</span>
        </div>
        <div class="utitle-right">
            下面那些比较符合您的情况或您会关注！
        </div>
    </h3>
    <div class="tags-select">
        <ul id="tagSelect">
        	<input type="hidden" name="tagsVal" value='${userInfo.tags }'/>
            <!-- 如果已经有标签了，则tagid要和下面列表的tagid一样，bg-xxx也要和下面的相同，以确保颜色相同，且删除的时候，下面相同的标签取消选中状态 -->
            <!-- <li class="bg-purple"><span tagid="13" class="item js-item"><em>名称名称</em><i></i></span></li> -->
			<c:choose>
				<c:when test="${null != userInfo.tagsMap && fn:length(userInfo.tagsMap) != 0 }">
					<c:forEach var="tagsEntry" items="${userInfo.tagsMap }" >
						<li class="bg-orange"><span tagid="${tagsEntry.key}" class='item js-item'><em>${tagsEntry.value}</em><i></i></span></li>
					</c:forEach>
				</c:when>
				<c:otherwise>
					<li class="no-data tag_tips" style="float:none;">暂无标签！</li>
				</c:otherwise>
			</c:choose>
        </ul>
    </div>
    <ul id="tags" class="ulist-items">
    	<c:forEach var="tagItem" items="${allTag.response.list }">
	    	<li class="bg-green">
	    		<div class="ulist-content">
	                <div class="title fyh">
	                    <table>
	                        <tr>
	                            <td>${tagItem.type}</td>
	                        </tr>
	                    </table>
	                    <span class="uarrow left"></span>
	                </div>
			    	 <div class="items">
				    	<c:forEach items="${tagItem.tags}" var="tag">
					         <span tagid="${tag.id }" class="item js-item"><em>${tag.tagName }</em><i></i></span>
				        </c:forEach>
				    </div>
	            </div>
			</li>
		</c:forEach>
    </ul>
</div>